package com.warmlight.voicepacket.ui.imlm.adapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.github.siyamed.shapeimageview.CircularImageView;
import com.warmlight.voicepacket.R;
import com.warmlight.voicepacket.base.SingleRecycleViewAdapter;

import java.util.Map;

public class MyIMMessageAdapter extends SingleRecycleViewAdapter<Map<String,String>> {

    public MyIMMessageAdapter(Context context) {
        super(context);
    }

    @Override
    public HashViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        View view = LayoutInflater.from(mContext).inflate(R.layout.item_chatmessage, parent, false);
        HashViewHolder holder = new HashViewHolder(view);
        holder.putView(R.id.ci_head);
        holder.putView(R.id.tv_msg_num);
        holder.putView(R.id.tv_nickname);
        holder.putView(R.id.tv_content);
        holder.putView(R.id.tv_time);

        return holder;
    }

    @Override
    public void onBindViewHolder(HashViewHolder holder, int position) {
        CircularImageView ci_head = (CircularImageView) holder.findView(R.id.ci_head);
        TextView tv_msg_num = (TextView) holder.findView(R.id.tv_msg_num);

    }
}
